package cn.util;

import java.util.HashMap;

/****
 * 
 * 成功信息提示
 *
 * @Author Wang Tao
 * @Company Saike
 * @Version V2.0
 */
public class SuccessInfo {
	/**
	 * 返回标识
	 */
	private String errorCode = "0";
	/***
	 * 返回对象
	 */
	private Object result;

	public SuccessInfo() {
	}

	public SuccessInfo(String code) {
		super();
		this.errorCode = code;
	}

	public SuccessInfo(Object result) {
		super();
		this.result = result;
	}

	public SuccessInfo(String errorCode, Object result) {
		super();
		this.errorCode = errorCode;
		this.result = result;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public Object getResult() {
		return result;
	}

	public void setResult(Object result) {
		if (result == null) {
			this.result = new HashMap<>();
			return;
		}
		this.result = result;
	}
}
